<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>交互青苹果和红苹果的值</title>
	</head>
	<body>
		<script type="text/javascript">
			//定义变量，交互青苹果和红苹果的值
			var apple1 = '青苹果';
			var apple2 = '红苹果';
			console.log("apple1::"+apple1+"=="+"apple2::"+apple2)
			//定义一个临时变量
			var temp;
			//让临时变量的值=apple1
			temp = apple1;
			
			apple1 = apple2;
			apple2 = temp;
			
			console.log("apple1::"+apple1+"=="+"apple2::"+apple2)
			
			/**
			 * apple1::青苹果==apple2::红苹果 
			   apple1::红苹果==apple2::青苹果
			 */
		</script>
	</body>
</html>
